Skip to content

AI-249: Support CustomTool in OpenAI Agents plugin tool dispatch#1570

Merged
xumaple merged 5 commits into
mainfrom
maplexu/AI-249-custom-tool-dispatch
Jun 10, 2026
Merged

AI-249: Support CustomTool in OpenAI Agents plugin tool dispatch#1570
xumaple merged 5 commits into
mainfrom
maplexu/AI-249-custom-tool-dispatch

Conversation

@xumaple

@xumaple xumaple commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a CustomToolInput dataclass and CustomTool dispatch branch (mirroring the existing HostedMCPTool precedent), unblocking Workflows whose Agent exposes any CustomTool subclass — notably SandboxApplyPatchTool, which the default Filesystem capability registers on every SandboxAgent.
  • Round-trips defer_loading through tool_config so direct CustomTool(defer_loading=True) callers continue to work with ToolSearchTool() lazy tool discovery.

Fixes #1561.

xumaple and others added 3 commits May 29, 2026 05:26
Fixes #1561. Adds a CustomToolInput dataclass and CustomTool dispatch
branch (mirroring the existing HostedMCPTool precedent), so Workflows
exposing any CustomTool subclass — notably SandboxApplyPatchTool, which
the default Filesystem capability registers on every SandboxAgent — no
longer fail with `ValueError: Unsupported tool type: apply_patch` at
Activity input construction.

Also round-trips `defer_loading` through `tool_config`, so direct
`CustomTool(defer_loading=True)` callers continue to work with
`ToolSearchTool()` lazy tool discovery.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
basedpyright in CI flagged the inline async stub callable for missing
type annotations and unused-parameter warnings. Adds Any/str annotations
and underscore-prefixes the params.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@xumaple xumaple requested review from a team as code owners June 1, 2026 18:27
@xumaple xumaple force-pushed the maplexu/AI-249-custom-tool-dispatch branch from a56c783 to bbbf3fd Compare June 1, 2026 18:56
Comment thread tests/contrib/openai_agents/test_openai.py Outdated
Comment thread tests/contrib/openai_agents/test_openai.py
@xumaple xumaple enabled auto-merge (squash) June 10, 2026 16:21
@xumaple xumaple merged commit 24badcf into main Jun 10, 2026
26 of 28 checks passed
@xumaple xumaple deleted the maplexu/AI-249-custom-tool-dispatch branch June 10, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI Agents plugin doesn't support apply_patch with SandboxAgent

2 participants